package com.ml.carManager.ui.diver;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import androidx.annotation.NonNull;

import com.ml.carManager.R;
import com.ml.carManager.ui.my.MyActivity;

import butterknife.BindView;
import custom.base.ui.fragment.BaseFragment;


public class FragmentMy extends BaseFragment {
    @BindView(R.id.fragment_main_diver_my_info)
    TextView tvInfo;

    /**
     * 碎片界面回复的生命周期
     */
    public void onFragmentResume() {
        super.onFragmentResume();
        onResume();
    }


    @Override
    public void onResume() {
        super.onResume();
    }


    @Override
    public int getLayoutID() {
        return R.layout.fragment_main_diver_my;
    }

    @Override
    public void initView(@NonNull View view, @NonNull Bundle savedInstanceState) {
        super.initView(view, savedInstanceState);

    }

    @Override
    public void initObject(@NonNull Bundle savedInstanceState) {
        super.initObject(savedInstanceState);
    }

    @Override
    public void initData(@NonNull Bundle savedInstanceState) {
        super.initData(savedInstanceState);
    }


    @Override
    public void initListener() {
        tvInfo.setOnClickListener(this);
    }

    @Override
    public void onClick(View v, int clickID) {
        if (clickID == tvInfo.getId()) {
            startActivity(MyActivity.class);
        }
    }


    //如果你需要考虑更好的体验，可以这么操作
    @Override
    public void onStart() {
        super.onStart();
    }

    @Override
    public void onStop() {
        super.onStop();
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
    }


//    private void requestDetail() {
//        Call<BaseResponse<PlantStatistics>> call = appApi.getPlantStatistics();
//        call.enqueue(new NetProxyListener<PlantStatistics>(getALiveNetCallback()) {
//            @Override
//            protected boolean dealNullResponseData() {
//                return true;
//            }
//
//            @Override
//            public void onResponseSuccess(Call call, BaseResponse<PlantStatistics> response) {
//                PlantStatistics plantStatistics = response.getData();
//            }
//
//            @Override
//            public void onResponseError(Call call, Throwable t) {
//                super.onResponseError(call, t);
//            }
//
//            @Override
//            public void onResponseCodeError(Call call, BaseResponse<PlantStatistics> response) {
//                super.onResponseCodeError(call, response);
//            }
//        });
//    }
}
